RISC-V /Debug /Debug Module Control and Status 2 (dmcs2)

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Interpret as Debug Module Control and Status 2 (dmcs2)

31 2827 2423 2019 1615 1211 87 43 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (harts)hgselect 0 (hgwrite)hgwrite 0group0dmexttrigger 0 (halt)grouptype

hgselect=harts, grouptype=halt

Description

This register contains DM control and status bits that didn’t easily fit in {dm-dmcontrol} and {dm-dmstatus}. All are optional.

If halt groups are not implemented, then {dmcs2-group} will always be 0 when {dmcs2-grouptype} is 0.

If resume groups are not implemented, then {dmcs2-grouptype} will remain 0 even after 1 is written there.

The DM external triggers available to add to halt groups may be the same as or distinct from the DM external triggers available to add to resume groups.

Fields

hgselect

0 (harts): Operate on harts.

1 (triggers): Operate on DM external triggers.

hgwrite

When 1 is written and {dmcs2-hgselect} is 0, for every selected hart the DM will change its group to the value written to {dmcs2-group}, if the hardware supports that group for that hart. Implementations may also change the group of a minimal set of unselected harts in the same way, if that is necessary due to a hardware limitation.

When 1 is written and {dmcs2-hgselect} is 1, the DM will change the group of the DM external trigger selected by {dmcs2-dmexttrigger} to the value written to {dmcs2-group}, if the hardware supports that group for that trigger.

Writing 0 has no effect.

group

When {dmcs2-hgselect} is 0, contains the group of the hart specified by {hartsel}.

When {dmcs2-hgselect} is 1, contains the group of the DM external trigger selected by {dmcs2-dmexttrigger}.

The value written to this field is ignored unless {dmcs2-hgwrite} is also written 1.

Group numbers are contiguous starting at 0, with the highest number being implementation-dependent, and possibly different between different group types. Debuggers should read back this field after writing to confirm they are using a hart group that is supported.

If groups aren’t implemented, then this entire field is 0.

dmexttrigger

This field contains the currently selected DM external trigger.

If a non-existent trigger value is written here, the hardware will change it to a valid one or 0 if no DM external triggers exist.

grouptype

0 (halt): The remaining fields in this register configure halt groups.

1 (resume): The remaining fields in this register configure resume groups.

Links

() ()